import {
  createRouter,
  createWebHistory,
  RouteRecordRaw
} from 'vue-router'
import { AsyncComponentRoutes } from './config'
// 路由注解
type RouteProps = Array<RouteRecordRaw>

const routes: RouteProps = [
  {
    path: '/',
    redirect: '/login'
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('@/views/login/index.vue')
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})


export default router
